import requestApi from "src/erm/sscrppublic/common/components/requestApi";
import { toast } from 'nc-lightapp-front';
import {ajax } from 'nc-lightapp-front';


let requestDomain =  '';

let requestApiOverwrite = {
    ...requestApi,
    /**
     * 
     * @param {} prams 
     */
    invoiceQuery:(prams) => {
         ajax({
            url: `${requestDomain}/nccloud/erm/expenseaccount/ExpenseaccountInvoiceQueryImageAction.do`,
            data: prams.data,
            success: (data) => {
                if(data && data.success && data.data){
                    prams.success(data.data);
                }
            },
            error: (err) => {
                if(err && err.message){
                    toast({ color: 'warning', content: err.message}); /*扫描条码未查询到单据*/
                }
            }
        })
    }
}

export default  requestApiOverwrite;